﻿using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using KaytechSoftware.Cms.Entities.Interfaces;

namespace KaytechSoftware.Cms.Entities
{
    public class RepositoryInstaller : IWindsorInstaller
    {
        public void Install(IWindsorContainer container, IConfigurationStore store)
        {
            container.Register(Component.For(typeof(IRepository<>)).ImplementedBy(typeof(Repository<>)).LifestylePerWebRequest(),
                               Component.For(typeof(IUnitOfWorkService)).ImplementedBy(typeof(UnitOfWorkService)).LifestylePerWebRequest());
        }
    }
}
